package demoAnimal;

public class walk {
    public static void walk(IRunning iRunning){
    System.out.println("我带着伙伴去散步");
    iRunning.run();
}
    public static void main(String[] args) {
        Cat cat = new Cat("小猫");
        Frog frog = new Frog("小青蛙");
        walk(cat);
        walk(frog);
    }
}
